package com.sne.airways.system.dto;

import com.sne.airways.basecore.dto.BasePropertiesDTO;

import java.util.Set;

/**
 * Created by IntelliJ IDEA.
 * User: 李庆旭
 * Date: 11-6-21
 * Time: 下午1:59
 * To change this template use File | Settings | File Templates.
 */
public class TdOperationCheckDTO extends BasePropertiesDTO {
    /**
     * 主键
     */
    private String id;
    private String operationId;
    /**
     * 上级菜单ID
     */
    private String parentId;
    /**
     * 菜单级别
     */
    private int menuLevel;
    /**
     * 菜单排序
     */
    private int menuIndex;
    /**
     * 菜单控制器
     */
    private String menuController;
    /**
     * 菜单名称
     */
    private String menuName;
    /**
     * 菜单路径
     */
    private String menuView;
    /**
     * 菜单状态 是否可用
     */
    private String status;
    /**
     * ext 前端显示菜单使用
     */
    private String text;
    /**
     * ext 前端判断是否叶子节点使用
     */
    private boolean leaf;

    private String iconCls;//菜单图标样式

    private String collapsedCls;//折叠图标样式

    private String expandedCls; //展开图标样式
    /**
     * 下级菜单
     */
    private Set<TdOperationCheckDTO> children ;

    public Set<TdOperationCheckDTO> getChildren() {
        return children;
    }

    public void setChildren(Set<TdOperationCheckDTO> children) {
        this.children = children;
    }

    //设置节点是否被选中
    private boolean checked = false;

    public boolean isChecked() {
        return checked;
    }

    public void setChecked(boolean checked) {
        this.checked = checked;
    }

    public String getExpandedCls() {
        return expandedCls;
    }

    public void setExpandedCls(String expandedCls) {
        this.expandedCls = expandedCls;
    }

    public String getCollapsedCls() {
        return collapsedCls;
    }

    public void setCollapsedCls(String collapsedCls) {
        this.collapsedCls = collapsedCls;
    }

    public String getIconCls() {
        return iconCls;
    }

    public void setIconCls(String iconCls) {
        this.iconCls = iconCls;
    }

    public boolean isLeaf() {
        return leaf;
    }

    public void setLeaf(boolean leaf) {
        this.leaf = leaf;
    }

    public String getOperationId() {
        return operationId;
    }

    public void setOperationId(String operationId) {
        this.operationId = operationId;
    }

    public int getMenuLevel() {
        return menuLevel;
    }

    public void setMenuLevel(int menuLevel) {
        this.menuLevel = menuLevel;
    }

    public int getMenuIndex() {
        return menuIndex;
    }

    public void setMenuIndex(int menuIndex) {
        this.menuIndex = menuIndex;
    }

    public String getMenuName() {
        return menuName;
    }

    public void setMenuName(String menuName) {
        this.menuName = menuName;
    }

    public String getMenuController() {
        return menuController;
    }

    public void setMenuController(String menuController) {
        this.menuController = menuController;
    }

    public String getMenuView() {
        return menuView;
    }

    public void setMenuView(String menuView) {
        this.menuView = menuView;
    }

    public String getStatus() {
        return status;
    }

    public void setStatus(String status) {
        this.status = status;
    }

    public String getParentId() {
        return parentId;
    }

    public void setParentId(String parentId) {
        this.parentId = parentId;
    }
    public String getText(){
        return menuName;
    }

    public String getId() {
        return operationId;
    }

    public void setId(String id) {
        this.id = id;
    }
    @Override
    public int hashCode() {
        return this.getMenuIndex();
    }

    @Override
    public boolean equals(Object obj) {
        return (this == obj);
    }
}
